/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package util.reporte;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Rdelacruz
 * @param <F> Clase de cada fila
 * @param <T> Clase del total
 */
public class ReporteTotal<F,T> {    
    private final List<F> lista = new ArrayList<F>();
    private final Map<String,F> map = new HashMap<String,F>();
    private T total;//total relativo
    
    public void agregar(String key, F fila) {
        lista.add(fila);
        map.put(key,fila);
    }

    public F getElemento(String key) {
        return map.get(key);
    }

    public List<F> getLista() {
        return lista;
    }

    public T getTotal() {
        return total;
    }

    public void setTotal(T total) {
        this.total = total;
    }
    
    
}
